package cn.le.handler;

import cn.le.bean.vo.NettyMsg;
import cn.le.factory.HandlerFactory;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

public class ReadFilterHandler extends ChannelInboundHandlerAdapter {

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object obj) throws Exception {
        NettyMsg msg = (NettyMsg) obj;
        HandlerFactory.getHandlerMap().get(msg.getCode()).doFilter(ctx,msg);
    }
}
